package com.rybbaby.tss.front.tssMemberPackage.dao;


import com.rybbaby.tss.core.web.dao.IGenericDao;
import com.rybbaby.tss.front.tssMemberPackage.entity.TssMemberPackage;
import com.rybbaby.tss.front.tssMemberPackageHistory.entity.TssMemberPackageHistory;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @description 会员课时包数据库操作接口
 * 
 * @author 雷春琼
 * 
 * @createDate 2017-08-10 上午12:04:35
 */
public interface ITssMemberPackageDao extends IGenericDao<TssMemberPackage> {
    /**
     * 根据会员id查询购买课时包信息
     * @param memberId
     * @return
     */
    List<Map<String,Object>> getListByMemberId(String memberId, Integer type) throws Exception;

    /**
     * 修改会员课时包状态
     * @param packageStatus
     * @return
     */
    Integer updatePackageStatus(String targetDateId ,Integer packageStatus);

    /**
     * 修改会员课时包信息
     * @return
     */
    Integer updateParameterById(Map<String,Object> map,String id);


    int deductiveHours(Map<String, Object> packageInformation);

    int deductiveAttendanceDay(Map<String, Object> packageInformation);

    int absenteeismDeductiveHours(Map<String, Object> packageInformation);

    int absenteeismDeductiveAttendanceDay(Map<String, Object> packageInformation);

    int makeUpClassDeductiveHours(Map<String, Object> packageInformation);

    boolean batchDeductiveHours(ArrayList<Object[]> params);

    boolean batcheductiveAttendanceDay(ArrayList<Object[]> params);

    int reductionMakeUpClassDeductiveHours(Map<String, Object> packageInformation);

    int reductionAbsenteeismDeductiveHours(Map<String, Object> packageInformation);

    int addMakeUpClassDeductiveHours(Map<String, Object> packageInformation);

    Map<String,Object> findApplyStatus(Integer type, String memberId);

    List<TssMemberPackage> findByMemberId(String targetDataId)throws Exception;

    int attendanceMaintenanceForParentingPackage(Map<String, Object> attendanceMaintenancePackageMap);

    int attendanceMaintenanceForTransitionPackage(Map<String, Object> attendanceMaintenancePackageMap);

    /**
     * 根据合同编号和类型查询课时包数据
     * 杨然
     * */
    List<TssMemberPackage> findCountByContract(String contract);

    /**
     * 根据会员id获取条数
     * 杨然
     * */
    Integer getCount(String stuId, Integer type);

    List<TssMemberPackage> findHistory(String paramId) throws Exception;

    List<Map<String,Object>>  finByHistory(String startTime_begin, String type);

    void absenceRecord(Map<String, Object> packageInformation);
}
